# 实现WSGI协议中的application接口方法

def application(envrion,start_response):
    """envrion-->字典，保存访问路径"""
    url_path = envrion['PATH_INFO']
    if url_path == '/index.py':
        body = 'index page ...'
    elif url_path == '/center.py':
        body = 'center page ...'
    else:
        body = 'other page ...'
    # 回调start_response函数，将响应状态信息回传给服务器
    start_response('200 OK',[('Content-Type','text/html;charset=utf-8')])
    #返回响应的数据内容
    return body




